#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

int n;

int main()
{
	scanf("%d", &n);
	int a[50][50];
	a[1][1] = 1;
	for (int i = 1;i <= n; i++)
	{
		for (int j = 1; j <= i; j++)
		{
			if (i == j || j == 1)
			{
				a[i][j] = 1;
				printf("%d ", a[i][j]);
			}
			else
			{
				a[i][j] = a[i - 1][j - 1] + a[i - 1][j];
				printf("%d ", a[i][j]);
			}
		}
		printf("\n");
	}
	return 0;
}